package com.heima.user.controller;

import com.heima.model.apUser.dtos.LoginDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.ApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户业务层
 *
 * @author 11494
 * @version 1.0
 * @project heima-leadnews
 * @date 2024/2/29 19:47:54
 */
@RestController
@RequestMapping("/api/v1/login")
@Api("app端用户登录")
@Slf4j
public class ApUserController {
    @Autowired
    private ApUserService apUserService;

    @PostMapping("login_auth")
    @ApiOperation("app端用户登录接口")
    public ResponseResult loginAuth(@RequestBody LoginDto loginDto){
        log.info("------------进入用户微服务-------------");
        return apUserService.loginAuth(loginDto);
    }
}
